package com.example.exception;

//自定义异常，传递错误信息
public class CustomException extends RuntimeException{
    private String code;
    private String msg;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

     public CustomException(String code,String msg){
         this.msg = msg;
         this.code = code;
    }
}
